function Phi_Gumbel=param_Gumbel_closedform_nosingles(PYX_cond, PXY_cond, ntypes_m, ntypes_w)
%% U,V
U_Gumbel=zeros(ntypes_m,ntypes_w);
for i=1:ntypes_m
for j=1:ntypes_w
    U_Gumbel(i,j)=log(PYX_cond(i,j));  
end
end

V_Gumbel=zeros(ntypes_m,ntypes_w);
for j=1:ntypes_w
for i=1:ntypes_m
    V_Gumbel(i,j)=log(PXY_cond(j,i)); 
end
end



%% Phi
Phi_Gumbel=zeros(ntypes_m,ntypes_m); %here ntypes_m=ntypes_w
for i=1:ntypes_m
    for j=1:ntypes_m
        Phi_Gumbel(i,j)=U_Gumbel(i,j)+V_Gumbel(i,j); 
    end
end

end

